/**
 * webpack.prod.js
 */
const CopyWebpackPlugin = require('copy-webpack-plugin');

module.exports = {
  mode: 'production',
  // 打包文件大小校验，用以提醒性能优化，比如压缩
  performance: {
    hints: "error",
    maxEntrypointSize: 300 * 1024,
    maxAssetSize: 500 * 1024
  },
  plugins: [
    new CopyWebpackPlugin({
      patterns: [
        {
          from: 'public',
          globOptions: {
            ignore: ['**/index.html']
          }
        }
      ]
    }),
  ]
}